package org.mobai.algorithm;

import org.apache.shardingsphere.api.sharding.standard.RangeShardingAlgorithm;
import org.apache.shardingsphere.api.sharding.standard.RangeShardingValue;
import org.mobai.util.ShardingUtils;

import java.util.Collection;
import java.util.Collections;
import java.util.Date;

/**
 * @author Administrator
 * @version v1.0
 * @className OrderItemRangeShardingAlgorithm
 * @description
 * @date 2024/5/11 星期六 14:30
 **/
public class OrderItemRangeShardingAlgorithm implements RangeShardingAlgorithm<Date> {
    @Override
    public Collection<String> doSharding(Collection<String> collection, RangeShardingValue<Date> rangeShardingValue) {
        return ShardingUtils.quarterRangeSharding(collection,rangeShardingValue);
    }
}
